class BookResultEntity {
	int ret;
	Data data;

	BookResultEntity({this.ret, this.data});

	BookResultEntity.fromJson(Map<String, dynamic> json) {
		ret = json['ret'];
		data = json['data'] != null ? new Data.fromJson(json['data']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['ret'] = this.ret;
		if (this.data != null) {
			data['data'] = this.data.toJson();
		}
		return data;
	}
}

class Data {
	int page;
	int pageSize;
	int totalCount;
	int categoryId;
	int sort;
	List<AlbumBriefDetailInfos> albumBriefDetailInfos;

	Data(
			{this.page,
				this.pageSize,
				this.totalCount,
				this.categoryId,
				this.sort,
				this.albumBriefDetailInfos});

	Data.fromJson(Map<String, dynamic> json) {
		page = json['page'];
		pageSize = json['pageSize'];
		totalCount = json['totalCount'];
		categoryId = json['categoryId'];
		sort = json['sort'];
		if (json['albumBriefDetailInfos'] != null) {
			albumBriefDetailInfos = new List<AlbumBriefDetailInfos>();
			json['albumBriefDetailInfos'].forEach((v) {
				albumBriefDetailInfos.add(new AlbumBriefDetailInfos.fromJson(v));
			});
		}
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['page'] = this.page;
		data['pageSize'] = this.pageSize;
		data['totalCount'] = this.totalCount;
		data['categoryId'] = this.categoryId;
		data['sort'] = this.sort;
		if (this.albumBriefDetailInfos != null) {
			data['albumBriefDetailInfos'] =
					this.albumBriefDetailInfos.map((v) => v.toJson()).toList();
		}
		return data;
	}
}

class AlbumBriefDetailInfos {
	int id;
	AlbumInfo albumInfo;
	StatCountInfo statCountInfo;
	PageUriInfo pageUriInfo;
	AnchorInfo anchorInfo;

	AlbumBriefDetailInfos(
			{this.id,
				this.albumInfo,
				this.statCountInfo,
				this.pageUriInfo,
				this.anchorInfo});

	AlbumBriefDetailInfos.fromDB(Map<String, dynamic> json) {
		id = json['_id'];
		albumInfo = new AlbumInfo.fromJson(json);
	}

	AlbumBriefDetailInfos.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		albumInfo = json['albumInfo'] != null
				? new AlbumInfo.fromJson(json['albumInfo'])
				: null;
		statCountInfo = json['statCountInfo'] != null
				? new StatCountInfo.fromJson(json['statCountInfo'])
				: null;
		pageUriInfo = json['pageUriInfo'] != null
				? new PageUriInfo.fromJson(json['pageUriInfo'])
				: null;
		anchorInfo = json['anchorInfo'] != null
				? new AnchorInfo.fromJson(json['anchorInfo'])
				: null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		if (this.albumInfo != null) {
			data['albumInfo'] = this.albumInfo.toJson();
		}
		if (this.statCountInfo != null) {
			data['statCountInfo'] = this.statCountInfo.toJson();
		}
		if (this.pageUriInfo != null) {
			data['pageUriInfo'] = this.pageUriInfo.toJson();
		}
		if (this.anchorInfo != null) {
			data['anchorInfo'] = this.anchorInfo.toJson();
		}
		return data;
	}
}

class AlbumInfo {
	int id;
	String cover;
	String title;
	String customTitle;
	String shortIntro;
	String salePoint;
	String recommendReason;
	int albumTag;
	int albumFinishTag;
	int albumPreferTag;
	int albumType;
	int albumPayType;
	int albumVipPayType;
	bool isVipFirst;

	AlbumInfo(
			{this.id,
				this.cover,
				this.title,
				this.customTitle,
				this.shortIntro,
				this.salePoint,
				this.recommendReason,
				this.albumTag,
				this.albumFinishTag,
				this.albumPreferTag,
				this.albumType,
				this.albumPayType,
				this.albumVipPayType,
				this.isVipFirst});

	AlbumInfo.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		cover = json['cover'];
		title = json['title'];
		customTitle = json['customTitle'];
		shortIntro = json['shortIntro'];
		salePoint = json['salePoint'];
		recommendReason = json['recommendReason'];
		albumTag = json['albumTag'];
		albumFinishTag = json['albumFinishTag'];
		albumPreferTag = json['albumPreferTag'];
		albumType = json['albumType'];
		albumPayType = json['albumPayType'];
		albumVipPayType = json['albumVipPayType'];
		isVipFirst = json['isVipFirst'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['cover'] = this.cover;
		data['title'] = this.title;
		data['customTitle'] = this.customTitle;
		data['shortIntro'] = this.shortIntro;
		data['salePoint'] = this.salePoint;
		data['recommendReason'] = this.recommendReason;
		data['albumTag'] = this.albumTag;
		data['albumFinishTag'] = this.albumFinishTag;
		data['albumPreferTag'] = this.albumPreferTag;
		data['albumType'] = this.albumType;
		data['albumPayType'] = this.albumPayType;
		data['albumVipPayType'] = this.albumVipPayType;
		data['isVipFirst'] = this.isVipFirst;
		return data;
	}
}

class StatCountInfo {
	int id;
	int playCount;
	int trackCount;

	StatCountInfo({this.id, this.playCount, this.trackCount});

	StatCountInfo.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		playCount = json['playCount'];
		trackCount = json['trackCount'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['playCount'] = this.playCount;
		data['trackCount'] = this.trackCount;
		return data;
	}
}

class PageUriInfo {
	int id;
	int categoryId;
	String categoryName;
	String categoryCode;
	String pinyin;
	String url;

	PageUriInfo(
			{this.id,
				this.categoryId,
				this.categoryName,
				this.categoryCode,
				this.pinyin,
				this.url});

	PageUriInfo.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		categoryId = json['categoryId'];
		categoryName = json['categoryName'];
		categoryCode = json['categoryCode'];
		pinyin = json['pinyin'];
		url = json['url'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['categoryId'] = this.categoryId;
		data['categoryName'] = this.categoryName;
		data['categoryCode'] = this.categoryCode;
		data['pinyin'] = this.pinyin;
		data['url'] = this.url;
		return data;
	}
}

class AnchorInfo {
	int id;
	String nickname;
	bool isVip;
	String logo;
	int verifyStatus;
	int verifyType;
	int anchorGrade;
	int userGrade;
	String personDescribe;
	String personalSignature;
	String ptitle;
	String mobileBackgroundPic;
	bool isLoginBan;

	AnchorInfo(
			{this.id,
				this.nickname,
				this.isVip,
				this.logo,
				this.verifyStatus,
				this.verifyType,
				this.anchorGrade,
				this.userGrade,
				this.personDescribe,
				this.personalSignature,
				this.ptitle,
				this.mobileBackgroundPic,
				this.isLoginBan});

	AnchorInfo.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		nickname = json['nickname'];
		isVip = json['isVip'];
		logo = json['logo'];
		verifyStatus = json['verifyStatus'];
		verifyType = json['verifyType'];
		anchorGrade = json['anchorGrade'];
		userGrade = json['userGrade'];
		personDescribe = json['personDescribe'];
		personalSignature = json['personalSignature'];
		ptitle = json['ptitle'];
		mobileBackgroundPic = json['mobileBackgroundPic'];
		isLoginBan = json['isLoginBan'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['nickname'] = this.nickname;
		data['isVip'] = this.isVip;
		data['logo'] = this.logo;
		data['verifyStatus'] = this.verifyStatus;
		data['verifyType'] = this.verifyType;
		data['anchorGrade'] = this.anchorGrade;
		data['userGrade'] = this.userGrade;
		data['personDescribe'] = this.personDescribe;
		data['personalSignature'] = this.personalSignature;
		data['ptitle'] = this.ptitle;
		data['mobileBackgroundPic'] = this.mobileBackgroundPic;
		data['isLoginBan'] = this.isLoginBan;
		return data;
	}
}